import org.apache.batik.swing.*;
import org.apache.batik.swing.svg.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
//import java.awt.Event

public class test{

JSVGCanvas svgCanvas=new JSVGCanvas();

public static void main(String args[]){

JFrame frame=new JFrame("JSVGCanvas Demo");
frame.setSize(400,400);

frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent ev){
System.exit(0);
}
});

new test(frame);
}

public test(JFrame frame){

frame.getContentPane().setLayout(new BorderLayout());
frame.getContentPane().add("Center",svgCanvas);
frame.setVisible(true);

svgCanvas.setURI("file:/D:/JAVAandXML/SVGCanvasDemo/classes/batikYin.svg");
}
}